<template>
  <view class="agreement-container">
    <u-checkbox v-model="agree" shape="square" activeColor="#3B75FA"/>
    <text class="agreement-text">查看并同意</text>
    <text class="agreement-link" @click="$emit('openAgreement')">《平台服务协议》</text>
  </view>
</template>

<script>
export default {
  name: 'ApplyAgreement',
  props: {
    agree: {
      type: Boolean,
      required: true
    }
  },
  emits: ['openAgreement']
}
</script>

<style lang="scss" scoped>
.agreement-container {
  display: flex;
  align-items: center;
  padding: 24rpx 0 0 0;
}
.agreement-text {
  color: #666666;
  font-size: 26rpx;
  margin-left: 8rpx;
}
.agreement-link {
  color: #3B75FA;
  font-size: 28rpx;
  margin-left: 2rpx;
}
</style> 